import request from "@/utils/request";

// 查询作业计划列表
export function listWorkPlan(query) {
  return request({
    url: "/workPlan/workPlan/list",
    method: "get",
    params: query,
  });
}
// 查询作业计划列表
export function listWorkPlan1(query) {
  return request({
    url: "/workPlan/workPlan/list1",
    method: "get",
    params: query,
  });
}
// 查询作业计划详细
export function getWorkPlan(id) {
  return request({
    url: "/workPlan/workPlan/" + id,
    method: "get",
  });
}

// 新增作业计划
export function addWorkPlan(data) {
  return request({
    url: "/workPlan/workPlan/addList",
    method: "post",
    data: data,
  });
}

// 修改作业计划
export function updateWorkPlan(data) {
  return request({
    url: "/workPlan/workPlan",
    method: "put",
    data: data,
  });
}

// 删除作业计划
export function delWorkPlan(id) {
  return request({
    url: "/workPlan/workPlan/" + id,
    method: "delete",
  });
}

// 查询列位下拉选

export function listChoice() {
  return request({
    url: "/car/car/choice",
    method: "get",
  });
}

// 查询历史计划列表
export function workHistoryList(query) {
  return request({
    url: "/workPlan/workPlan/historylist",
    method: "get",
    params: query,
  });
}

// 查询作业记录
export function listbycar(query) {
  return request({
    url: "/workRecord/workRecord/listbycar",
    method: "get",
    params: query,
  });
}

// 查询班组列表
export function workTeamList(query) {
  return request({
    url: "/workTeam/workTeam/alllist",
    method: "get",
    params: query,
  });
}
// 已选班组
export function PlanTeamlistvo(query) {
  return request({
    url: "/PlanTeam/PlanTeam/listvo",
    method: "get",
    params: query,
  });
}
// 新增作业、
export function addlist(data) {
  return request({
    url: "/PlanTeam/PlanTeam/addlist",
    method: "post",
    data,
  });
}

// 修改班组卡控
export function editonoff(id) {
  return request({
    url: "/workPlan/workPlan/editonoff/" + id,
    method: "post",
  });
}

// 验证班组是否开始作业
export function PlanTeamOnOff(params) {
  return request({
    url: "/PlanTeam/PlanTeam/OnOff",
    method: "get",
    params,
  });
}

// 恢复作业
export function Planrestore(data) {
  return request({
    url: "/plan/plan/restore",
    method: "post",
    data,
  });
}

// 恢复作业
export function checkData(data) {
  return request({
    url: "/plan/plan/dataDetection",
    method: "post",
    data,
  });
}

// 设置时间
export function edittime(data) {
  return request({
    url: "/workPlan/workPlan/edittime",
    method: "post",
    data,
  });
}

// 查询时间
export function gettimeInfo(data) {
  return request({
    url: "/workPlan/workPlan/gettimeInfo",
    method: "post",
    data,
  });
}

// 批量下载
export function createXLSlIST(id) {
  return request({
    url: "/workRecord/workRecord/createXLS2/"+id,
    method: "get"
  });
}


